VIVE 3DSP Native C Library  ver 1.0.0.0
Audio 3DSP (3D Sound Perception) Native C Library
Related Functions
vive_3dsp_occlusion Struct Reference

The vive_3dsp_occlusion structure represents the 3D occlusion model. More...

#include <vive_3dsp_api/occlusion.h>

Related Functions

(Note that these are not member functions.)

vive_3dsp_occlusion * vive_3dsp_occlusion_create_object (vive_3dsp_context *api)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_destroy_object (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_enable (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, bool enable)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_material (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, VIVE_3DSP_OCC_MATERIAL material)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_cover_ratio (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, vive_3dsp_audiosource *src, float cover_ratio)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_channel_cover_ratio (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, vive_3dsp_audiosource *src, VIVE_3DSP_OCCLUSION_CHANNEL_ID chnID, float cover_ratio)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_channel_num (vive_3dsp_context *api, int chnNum)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_depth_ratio (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, float depthRatio)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_material_RHF (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, float rhf)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_material_LF_ratio (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, float LF_ratio)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_mode (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, VIVE_3DSP_OCCLUSION_ENGINE mode)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_radius (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, float radius)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_box_size (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, VIVE_3DSP_Vector3 size)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_position (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, VIVE_3DSP_Vector3 position)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_rotation (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, VIVE_3DSP_Quaternion rotation)
 
VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_property (vive_3dsp_context *api, vive_3dsp_occlusion *occlusion, VIVE_3DSP_OCCLUSION_PROPERTY prop)
 

Detailed Description

The vive_3dsp_occlusion structure represents the 3D occlusion model.

Examples:
Example.cpp.

Friends And Related Function Documentation

◆ vive_3dsp_occlusion_create_object()

vive_3dsp_occlusion * vive_3dsp_occlusion_create_object ( vive_3dsp_context *  api)
related

Create an occlusion object. This function must be called to get an occlusion object before calling any other functions that can manipulate occlusion property.

Parameters
apiThe audio engine object.
Returns
Occlusion object.

◆ vive_3dsp_occlusion_destroy_object()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_destroy_object ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion 
)
related

Destroy the specific occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_occlusion_enable()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_enable ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
bool  enable 
)
related

Enable or disable occlusion effect of the specific audio occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
enableSet true to enable the effect. Otherwise, set false.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_occlusion_set_box_size()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_box_size ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
VIVE_3DSP_Vector3  size 
)
related

Set size of the box-like occlusion object. It works only when the engine mode is AdvancedOcclusion.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
sizeThe size.

◆ vive_3dsp_occlusion_set_channel_cover_ratio()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_channel_cover_ratio ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
vive_3dsp_audiosource *  src,
VIVE_3DSP_OCCLUSION_CHANNEL_ID  chnID,
float  cover_ratio 
)
related

Specify the cover ratio of a specific audio source for a specific ear covered by a specific object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
srcThe audio source object.
chnID0 for left ear, 1 for right ear.
cover_ratioThe cover ratio. The minumum value 0.0 means that the audio source is not muffled. The maximum value 1.0 indicates the occlusion muffled the audio source enormously.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_occlusion_set_channel_num()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_channel_num ( vive_3dsp_context *  api,
int  chnNum 
)
related

Specify the occlusion channel number.

Parameters
apiThe audio engine object.
chnNum1 for mono mode, 2 for binaural mode.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_occlusion_set_cover_ratio()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_cover_ratio ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
vive_3dsp_audiosource *  src,
float  cover_ratio 
)
related

Specify the cover ratio of a specific audio source covered by a specific object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
srcThe audio source object.
cover_ratioThe cover ratio. The minumum value 0.0 means that the audio source is not muffled. The maximum value 1.0 indicates the occlusion muffled the audio source enormously.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_occlusion_set_depth_ratio()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_depth_ratio ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
float  depthRatio 
)
related

Specify the density / depth amount of the occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
depthRatioThe density/depth rate. 1 represents thin/sparse and 2 represents thick/dense.

◆ vive_3dsp_occlusion_set_material()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_material ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
VIVE_3DSP_OCC_MATERIAL  material 
)
related

Specify the materials of the object. The material property of the object will apply different effects to the audio source when the object state between the source and the listener.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
materialSpecify the material of the object. Refer to HTC_Vive3DSP_SDK::VIVE_3DSP_OCC_MATERIAL.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_occlusion_set_material_LF_ratio()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_material_LF_ratio ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
float  LF_ratio 
)
related

Specify the low frequency ratio corresponding to referenced high frequency of the occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
LF_ratioThe attenuated ratio of the low frequency ratio corresponding to referenced high frequency. The minimal value 0 means no attenuation in low frequency band and maximal value 1 means the attenuated level is equal to rhf specified in vive_3dsp_occlusion_set_material_RHF.

◆ vive_3dsp_occlusion_set_material_RHF()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_material_RHF ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
float  rhf 
)
related

Specify the level of the referenced high frequency of the occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
rhfThe attenuated level of the referenced high frequency in dB scale. The maximal value 0 means that the occlusion effect is not effective.

◆ vive_3dsp_occlusion_set_mode()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_mode ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
VIVE_3DSP_OCCLUSION_ENGINE  mode 
)
related

Set physical engine of the occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
modePhysical engine mode. Please refer to HTC_Vive3DSP_SDK::VIVE_3DSP_OCCLUSION_ENGINE.

◆ vive_3dsp_occlusion_set_position()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_position ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
VIVE_3DSP_Vector3  position 
)
related

Set position of the occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
positionThe position.

◆ vive_3dsp_occlusion_set_property()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_property ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
VIVE_3DSP_OCCLUSION_PROPERTY  prop 
)
related

Specify occlusion properties.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
propOcclusion properties.

◆ vive_3dsp_occlusion_set_radius()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_radius ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
float  radius 
)
related

Set radius of the sphere-like occlusion object. It works only when the engine mode is BasicOcclusion.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
radiusThe radius.

◆ vive_3dsp_occlusion_set_rotation()

VIVE_3DSP_API_STATUS vive_3dsp_occlusion_set_rotation ( vive_3dsp_context *  api,
vive_3dsp_occlusion *  occlusion,
VIVE_3DSP_Quaternion  rotation 
)
related

Set rotation of the occlusion object.

Parameters
apiThe audio engine object.
occlusionThe cclusion object created by vive_3dsp_occlusion_create_object.
rotationThe rotation.

The documentation for this struct was generated from the following file: